package ro.cityprojects.adminloc.entities;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Bill class
 *
 * @author bogdan.solga
 * 
 * Date: 13.06.2013, time: 17:47
 */
@Entity
public class Bill {

    @Id
    @javax.persistence.Column(name = "BILL_ID", nullable = false, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer billId;

    public Integer getBillId() {
        return billId;
    }

    public void setBillId(Integer billId) {
        this.billId = billId;
    }

    @javax.persistence.Column(name = "EMISSION_DATE", nullable = false, insertable = true, updatable = true, length = 7, precision = 0)
    private Timestamp emissionDate;

    public Timestamp getEmissionDate() {
        return emissionDate;
    }

    public void setEmissionDate(Timestamp emissionDate) {
        this.emissionDate = emissionDate;
    }

    @javax.persistence.Column(name = "BILL_IDENTIFIER", nullable = true, insertable = true, updatable = true, length = 32, precision = 0)
    private String billIdentifier;

    public String getBillIdentifier() {
        return billIdentifier;
    }

    public void setBillIdentifier(String billIdentifier) {
        this.billIdentifier = billIdentifier;
    }

    @javax.persistence.Column(name = "START_DATE", nullable = false, insertable = true, updatable = true, length = 7, precision = 0)
    private Timestamp startDate;

    public Timestamp getStartDate() {
        return startDate;
    }

    public void setStartDate(Timestamp startDate) {
        this.startDate = startDate;
    }

    @javax.persistence.Column(name = "END_DATE", nullable = false, insertable = true, updatable = true, length = 7, precision = 0)
    private Timestamp endDate;

    public Timestamp getEndDate() {
        return endDate;
    }

    public void setEndDate(Timestamp endDate) {
        this.endDate = endDate;
    }

    @javax.persistence.Column(name = "AMOUNT", nullable = false, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer amount;

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    @javax.persistence.Column(name = "QUANTITY", nullable = true, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer quantity;

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    @javax.persistence.Column(name = "PENALTY_PERCENT", nullable = false, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer penaltyPercent;

    public Integer getPenaltyPercent() {
        return penaltyPercent;
    }

    public void setPenaltyPercent(Integer penaltyPercent) {
        this.penaltyPercent = penaltyPercent;
    }

    @javax.persistence.Column(name = "PENALTY_AMOUNT", nullable = false, insertable = true, updatable = true, length = 0, precision = -127)
    private Integer penaltyAmount;

    public Integer getPenaltyAmount() {
        return penaltyAmount;
    }

    public void setPenaltyAmount(Integer penaltyAmount) {
        this.penaltyAmount = penaltyAmount;
    }

    @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
    @javax.persistence.JoinColumn(name = "EXPENSE_TYPE", referencedColumnName = "EXPENSE_TYPE_ID", nullable = false)
    private ExpenseTypes expenseTypesByExpenseType;

    public ExpenseTypes getExpenseTypesByExpenseType() {
        return expenseTypesByExpenseType;
    }

    public void setExpenseTypesByExpenseType(ExpenseTypes expenseTypesByExpenseType) {
        this.expenseTypesByExpenseType = expenseTypesByExpenseType;
    }
}
